fix bug: 'Settings' object has no attribute 'KODO_DEFAULT_BRAND_ID'

FFIB %!s(int64=4) %!d(string=hace) años
padre
commit
ccdf8f7a62
Se han modificado 1 ficheros con 3 adiciones y 6 borrados
  1. 3 6
      api/mini_views.py

+ 3 - 6
api/mini_views.py

@@ -20,7 +20,6 @@ logger = logging.getLogger('logit')
20 20
 @logit
21 21
 @transaction.atomic
22 22
 def get_userinfo_api(request):
23
-    brand_id = request.POST.get('brand_id', settings.KODO_DEFAULT_BRAND_ID)
24 23
     appId = request.POST.get('appId', 'MINIAPP')
25 24
 
26 25
     wxcfg = WECHAT.get(appId, {})
@@ -66,13 +65,12 @@ def get_userinfo_api(request):
66 65
     # Just for compatible because of store session_key has changed
67 66
     store_session_key(appid=appid, secret=secret, session_key=session_key, unid='', storage=RedisStorage(r))
68 67
 
69
-    return response(200, 'Mini App Login Success', u'微信小程序登录成功', user.brandata(brand_id=brand_id))
68
+    return response(200, 'Mini App Login Success', u'微信小程序登录成功', user.data)
70 69
 
71 70
 
72 71
 @logit(res=True)
73 72
 @transaction.atomic
74 73
 def mini_login_api(request):
75
-    brand_id = request.POST.get('brand_id', settings.KODO_DEFAULT_BRAND_ID)
76 74
     appId = request.POST.get('appId', 'MINIAPP')
77 75
 
78 76
     wxcfg = WECHAT.get(appId, {})
@@ -120,13 +118,12 @@ def mini_login_api(request):
120 118
     # Just for compatible because of store session_key has changed
121 119
     store_session_key(appid=appid, secret=secret, session_key=session_key, unid='', storage=RedisStorage(r))
122 120
 
123
-    return response(200, 'Mini App Login Success', u'微信小程序登录成功', user.brandata(brand_id=brand_id))
121
+    return response(200, 'Mini App Login Success', u'微信小程序登录成功', user.data)
124 122
 
125 123
 
126 124
 @logit
127 125
 @transaction.atomic
128 126
 def get_userinfo_api2(request):
129
-    brand_id = request.POST.get('brand_id', settings.KODO_DEFAULT_BRAND_ID)
130 127
     user_id = request.POST.get('user_id', '')
131 128
     appId = request.POST.get('appId', 'MINIAPP')
132 129
 
@@ -168,4 +165,4 @@ def get_userinfo_api2(request):
168 165
     user.city = userinfo.get('city', '')
169 166
     user.save()
170 167
 
171
-    return response(200, 'Mini App Get Userinfo Success', u'微信小程序获取用户信息成功', user.brandata(brand_id=brand_id))
168
+    return response(200, 'Mini App Get Userinfo Success', u'微信小程序获取用户信息成功', user.data)